load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "structlogging",
    srcs = ["hot_ranges_log.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/server/structlogging",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/server/serverpb",
        "//pkg/settings",
        "//pkg/settings/cluster",
        "//pkg/sql",
        "//pkg/util/log",
        "//pkg/util/log/eventpb",
        "//pkg/util/log/logpb",
        "//pkg/util/log/logutil",
        "//pkg/util/stop",
        "//pkg/util/timeutil",
    ],
)

go_test(
    name = "structlogging_test",
    srcs = [
        "hot_ranges_log_test.go",
        "main_test.go",
    ],
    exec_properties = select({
        "//build/toolchains:is_heavy": {"test.Pool": "large"},
        "//conditions:default": {"test.Pool": "default"},
    }),
    deps = [
        ":structlogging",
        "//pkg/base",
        "//pkg/keys",
        "//pkg/kv/kvserver",
        "//pkg/kv/kvserver/allocator/plan",
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/server",
        "//pkg/sql/catalog/desctestutils",
        "//pkg/testutils",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/sqlutils",
        "//pkg/testutils/testcluster",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/log/eventpb",
        "//pkg/util/log/logpb",
        "//pkg/util/randutil",
        "//pkg/util/syncutil",
        "@com_github_cockroachdb_errors//:errors",
    ],
)
